The QinQ protocol is a tunneling protocol used in Layer 2 based on the IEEE 802.1Q technology, and is a technology for extending the space of Virtual Local Area Network (VLAN). Specifically, an additional layer of 802.1Q tag header is added to 802.1Q tagged packet. As the packet transmitted based on this technology in a backbone network has two layers of 802.1Q tag headers (one for public network, and the other for private network), the technical protocol is referred to as the QinQ protocol, that is, the 802.1Q-in-802.1Q protocol.
Currently, a network termination equipment based on the QinQ protocol acts as an access point, the packet encapsulated with two layers of VLAN tags is received, the two layers of the VLAN tags are both stripped, and the packet is forwarded. The network termination equipment based on the QinQ protocol herein is network equipment containing a QinQ termination interface, which is also referred to as QinQ termination equipment. When a traffic flow is sent from the network side to a client side via the QinQ termination interface, a Media Access Control (MAC) address and two layers of VLAN tags of the client are obtained by searching for an Address Resolution Protocol (ARP) entry of the client in an ARP table according to an Internet Protocol (IP) address of the packet of the traffic flow at the QinQ termination interface. Then, the obtained MAC address and the two layers of VLAN tags are encapsulated, and the packet is forwarded to the client. If no corresponding ARP entry is found, the ARP entry is obtained through active learning and the ARP table is updated.
FIG. 1 is a schematic structural view of a network based on the QinQ protocol. As shown in FIG. 1, Router1 is a QinQ termination interface; Switch1 encapsulates a first layer of VLAN tag to the packet; and Switch2 and Switch3 encapsulate a second layer of VLAN tag to the packet. When a traffic flow needs to be sent from a network side (Internet) to Client1 at a client side via the QinQ termination interface, if an ARP entry corresponding to Client1 is found in Router1, an MAC address and two layers of VLAN tags corresponding to Client1 are encapsulated directly, and the packet of the traffic flow are sent. The packet of the traffic flow can be sent to Client1 after being processed by Switch1 and Switch2.
However, if no ARP entry corresponding to Client1 is found in Router1, Router1 needs to actively send an ARP request for learning and obtaining the ARP entry of Client1. As the two layers of VLAN tag information of Client1 cannot be obtained, the QinQ termination interface needs to be traversed, that is, the ARP request needs to be sent to all the VLAN tags which are configured on the QinQ termination interface so as to ensure Client1 to receive the ARP request. After receiving the ARP request, Client1 returns a response, and Router1 can learn the related ARP entry according to the response from Client1.
In the implementation of the present invention, the inventors found that the above technical solution has the following problems. Since the two layers of VLAN tag information cannot be obtained, ARP request needs to be sent by traversing all the VLAN tags which are configured on the QinQ termination interface. If the number of the configured VLAN tags is large, plenty of ARP requests need to be sent, and this results in blockage in the network channel. Moreover, only one set of the two layers of VLAN tags is corresponding to the client, that is to say, only one of the large number of sent ARP packets is valid, while the others are junk packets, and this results in a great waste of network resources. In addition, if the performance of the switches which are connected to the Router 1 is poor, the sending of a large number of ARP packets is almost equal to an attack on the network equipment, which may cause breakdown of the network equipment and affect the normal operation of the entire network.